export default function ({time}) {
  //处理日期类型24小时格式
  var mytime = new Date(time);  //获取到后台返回的日期字段的时间戳(java是13位)
  return mytime.getFullYear() + '-' + fullNum(Number(mytime.getMonth()) + 1) + '-' + fullNum(mytime.getDate()) + ' '
    + fullNum(mytime.getHours()) + ":" + fullNum(mytime.getMinutes()) + ":" + fullNum(mytime.getSeconds());
}

function fullNum(obj) {
  if (Number(obj) < 10) {
    return '0' + obj;
  } else {
    return obj;
  }
}
